<extend name="base" />

<block name="style">
<style type="text/css">
.main_info table{width:350px; height:auto;}
.main_info table td{padding:10px;}
.main_info table tr:first-child{background-color:rgb(240,245,250);}
.main_info table tr{border-bottom:#CCC 1px solid;}

.groupset{width:300px;}
</style>
</block>
<block name="md_title">
	<div class="title">创建用户</div>
    <button class="buttonC" style="float:left">返回列表</button>
    <button class="buttonA">提交</button>
</block>

<block name="main_cont">
	<table>
	<form action="index" method="post"><input type="hidden" name="userid" value="{$userid}">
    	<input type="hidden" name="func" value="addUser">
    	<tr><td>用户：<input type="text" id="username" name="username" class="textA" placeholder="邮箱名"></td></tr>
    	<tr><td>密码：<input type="password" id="password" name="password" class="textA" placeholder="密码大于六位"></td></tr>
    	<tr><td>密码：<input type="password" id="passworda" name="password_1" class="textA" placeholder="密码大于六位"></td></tr>
    </form>
	</table>
</block>

<block name="script">
<script language="javascript">
function checkInput(){
	var username	= $("#username").val();
	var password	= $("#password").val();
	var passworda	= $("#passworda").val();
	
	var mailForm	= /^[a-zA-Z0-9]+\@[a-zA-Z0-9]+\.[a-zA-Z0-9]+$/;
	if(!mailForm.test(username)){
		alert("抱歉，邮箱格式不正确，请检查!");
	}else if(username == ""||password == ""||passworda == ""){
		alert("请将信息填写完全!");
	}else if(password != passworda){
		alert("两次密码不一致，请检查!");
	}else if(password.length < 6){
		alert("抱歉，密码小于6位！");
	}else{
		return true;
	} 
}
</script>
</block>